<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/templates/lista.xhtml">
    <ui:param name="pPageTitle" value="${label['profis.titulo']}"/>
    <ui:param name="pAction" value="cadastrarProfissional"/>
    <ui:param name="pManagedBean" value="#{profissionalView}"/>
    <ui:param name="pTarget" value="#{profissionalView.profissional}"/>
    <ui:param name="pListaRecords" value="#{profissionalView.profissionais}"/>
    <ui:param name="pMsgConfirmationObject" value="profissional"/>
    <ui:param name="pMsgConfirmationDescription" value="#{profissionalView.profissional.nome}"/>
    <ui:define name="dataTable">
        <p:column sortBy="#{obj.nome}" filterBy="#{obj.nome}" filterMatchMode="contains">
            <f:facet name="header">
                <h:outputText value="${label['profis.nome']}"/>
            </f:facet>
            <h:outputText value="#{obj.nome}"/>
        </p:column>
        <p:column sortBy="#{obj.cpf}" filterBy="#{obj.cpf}" filterMatchMode="contains">
            <f:facet name="header">
                <h:outputText value="${label['profis.cpf']}"/>
            </f:facet>
            <h:outputText value="#{obj.cpf}"/>
        </p:column>
        <p:column sortBy="#{obj.crm}" filterBy="#{obj.crm}" filterMatchMode="contains">
            <f:facet name="header">
                <h:outputText value="${label['profis.crm']}"/>
            </f:facet>
            <h:outputText value="#{obj.crm}"/>
        </p:column>
        <p:column sortBy="#{obj.unidade.nomUnid}" filterBy="#{obj.unidade.nomUnid}" filterMatchMode="contains">
            <f:facet name="header">
                <h:outputText value="${label['profis.unidade']}"/>
            </f:facet>
            <h:outputText value="#{obj.unidade.nomUnid}"/>
        </p:column>
        <p:column sortBy="#{obj}" filterBy="#{obj}" filterMatchMode="contains">
            <f:facet name="header">
                <h:outputText value="${label['perg.1.1']}"/>
            </f:facet>
            <h:outputText value="#{obj.motivo.descricao}"/>
        </p:column>
        <p:column sortBy="#{obj}" filterBy="#{obj}" filterMatchMode="contains">
            <f:facet name="header">
                <h:outputText value="${label['perg.2.1']}"/>
            </f:facet>
            <h:outputText value="#{obj.motivo.descricao}"/>
        </p:column>
        <p:column sortBy="#{obj}" filterBy="#{obj}" filterMatchMode="contains">
            <f:facet name="header">
                <h:outputText value="${label['perg.3.1']}"/>
            </f:facet>
            <h:outputText value="#{obj.motivo.descricao}"/>
        </p:column>
        <p:column sortBy="#{obj}" filterBy="#{obj}" filterMatchMode="contains">
            <f:facet name="header">
                <h:outputText value="${label['perg.4.1']}"/>
            </f:facet>
            <h:outputText value="#{obj.motivo.descricao}"/>
        </p:column>
        <p:column sortBy="#{obj}" filterBy="#{obj}" filterMatchMode="contains">
            <f:facet name="header">
                <h:outputText value="${label['perg.5.1']}"/>
            </f:facet>
            <h:outputText value="#{obj.motivo.descricao}"/>
        </p:column>
    </ui:define>
</ui:composition>